package com.topvision.service.impl.region;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.topvision.mapper.region.RegionMapper;
import com.topvision.model.region.Region;
import com.topvision.service.region.RegionService;

@Service("regionService")
public class RegionServiceImpl implements RegionService {
	@Autowired
	private RegionMapper regionMapper;
	
	@Override
	public Region queryObject(Integer id){
		return regionMapper.queryObject(id);
	}
	
	@Override
	public List<Region> queryList(Map<String, Object> map){
		return regionMapper.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return regionMapper.queryTotal(map);
	}
	
	@Override
	public void save(Region region){
		regionMapper.save(region);
	}
	
	@Override
	public void update(Region region){
		regionMapper.update(region);
	}
	
	@Override
	public void delete(Integer id){
		regionMapper.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		regionMapper.deleteBatch(ids);
	}

	@Override
	public List<Region> findAll() {
		return regionMapper.findAll();
	}

	@Override
	public List<Region> provinces() {
		return regionMapper.provinces();
	}

	@Override
	public List<Region> cities(Long provinceid) {
		return regionMapper.cities(provinceid);
	}

}
